\(\int \frac {(a+b \arctan (c x))^2}{x (d+e x^2)^2} \, dx\) [1272]

   Optimal result
   Rubi [A] (verified)
   Mathematica [F]
   Maple [F]
   Fricas [F]
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 1087 \[ \int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx=-\frac {c^2 (a+b \arctan (c x))^2}{2 d \left (c^2 d-e\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^2}-\frac {b c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {i b^2 c \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {i b^2 c \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2} \]

[Out]

-1/2*c^2*(a+b*arctan(c*x))^2/d/(c^2*d-e)-2*(a+b*arctan(c*x))^2*arctanh(-1+2/(1+I*c*x))/d^2+(a+b*arctan(c*x))^2
*ln(2/(1-I*c*x))/d^2-1/2*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))
/d^2-1/2*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/d^2+I*b*(a+b*ar
ctan(c*x))*polylog(2,-1+2/(1+I*c*x))/d^2+1/2*I*b*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I
*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/d^2+1/2*I*b*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)
/(c*(-d)^(1/2)+I*e^(1/2)))/d^2-I*b*(a+b*arctan(c*x))*polylog(2,1-2/(1+I*c*x))/d^2-1/4*I*b^2*c*polylog(2,1-2*c*
((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))*e^(1/2)/(-d)^(3/2)/(c^2*d-e)+1/2*b^2*polylog(3,1-2/
(1-I*c*x))/d^2-1/2*b^2*polylog(3,1-2/(1+I*c*x))/d^2+1/2*b^2*polylog(3,-1+2/(1+I*c*x))/d^2-1/4*b^2*polylog(3,1-
2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/d^2-1/4*b^2*polylog(3,1-2*c*((-d)^(1/2)+x*e^(1/
2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/d^2-1/2*b*c*(a+b*arctan(c*x))*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/
(c*(-d)^(1/2)-I*e^(1/2)))*e^(1/2)/(-d)^(3/2)/(c^2*d-e)+1/2*b*c*(a+b*arctan(c*x))*ln(2*c*((-d)^(1/2)+x*e^(1/2))
/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))*e^(1/2)/(-d)^(3/2)/(c^2*d-e)-I*b*(a+b*arctan(c*x))*polylog(2,1-2/(1-I*c*x
))/d^2+1/4*I*b^2*c*polylog(2,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))*e^(1/2)/(-d)^(3/
2)/(c^2*d-e)+1/4*(a+b*arctan(c*x))^2/d^2/(1-x*e^(1/2)/(-d)^(1/2))+1/4*(a+b*arctan(c*x))^2/d^2/(1+x*e^(1/2)/(-d
)^(1/2))

Rubi [A] (verified)

Time = 1.28 (sec) , antiderivative size = 1087, normalized size of antiderivative = 1.00, number of steps used = 39, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.696, Rules used = {5100, 4942, 5108, 5004, 5114, 6745, 5098, 4974, 4966, 2449, 2352, 2497, 5104, 5040, 4964, 4968} \[ \int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx=\frac {i c \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{4 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {i c \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{4 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {\operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right ) b^2}{2 d^2}-\frac {\operatorname {PolyLog}\left (3,1-\frac {2}{i c x+1}\right ) b^2}{2 d^2}+\frac {\operatorname {PolyLog}\left (3,\frac {2}{i c x+1}-1\right ) b^2}{2 d^2}-\frac {\operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{4 d^2}-\frac {\operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{4 d^2}-\frac {c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b}{2 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {i (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right ) b}{d^2}-\frac {i (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right ) b}{d^2}+\frac {i (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,\frac {2}{i c x+1}-1\right ) b}{d^2}+\frac {i (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b}{2 d^2}+\frac {i (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b}{2 d^2}-\frac {c^2 (a+b \arctan (c x))^2}{2 d \left (c^2 d-e\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (\frac {\sqrt {e} x}{\sqrt {-d}}+1\right )}+\frac {2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{i c x+1}\right )}{d^2}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^2}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2} \]

[In]

Int[(a + b*ArcTan[c*x])^2/(x*(d + e*x^2)^2),x]

[Out]

-1/2*(c^2*(a + b*ArcTan[c*x])^2)/(d*(c^2*d - e)) + (a + b*ArcTan[c*x])^2/(4*d^2*(1 - (Sqrt[e]*x)/Sqrt[-d])) +
(a + b*ArcTan[c*x])^2/(4*d^2*(1 + (Sqrt[e]*x)/Sqrt[-d])) + (2*(a + b*ArcTan[c*x])^2*ArcTanh[1 - 2/(1 + I*c*x)]
)/d^2 + ((a + b*ArcTan[c*x])^2*Log[2/(1 - I*c*x)])/d^2 - (b*c*Sqrt[e]*(a + b*ArcTan[c*x])*Log[(2*c*(Sqrt[-d] -
 Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*(-d)^(3/2)*(c^2*d - e)) - ((a + b*ArcTan[c*x])^2*Log[
(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*d^2) + (b*c*Sqrt[e]*(a + b*ArcTan[c*x
])*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*(-d)^(3/2)*(c^2*d - e)) - ((a
+ b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*d^2) - (I*b*(a
 + b*ArcTan[c*x])*PolyLog[2, 1 - 2/(1 - I*c*x)])/d^2 - (I*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - 2/(1 + I*c*x)])
/d^2 + (I*b*(a + b*ArcTan[c*x])*PolyLog[2, -1 + 2/(1 + I*c*x)])/d^2 + ((I/4)*b^2*c*Sqrt[e]*PolyLog[2, 1 - (2*c
*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/((-d)^(3/2)*(c^2*d - e)) + ((I/2)*b*(a + b*A
rcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/d^2 - ((I/4)*
b^2*c*Sqrt[e]*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/((-d)^(3/2)
*(c^2*d - e)) + ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt
[e])*(1 - I*c*x))])/d^2 + (b^2*PolyLog[3, 1 - 2/(1 - I*c*x)])/(2*d^2) - (b^2*PolyLog[3, 1 - 2/(1 + I*c*x)])/(2
*d^2) + (b^2*PolyLog[3, -1 + 2/(1 + I*c*x)])/(2*d^2) - (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sq
rt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(4*d^2) - (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I
*Sqrt[e])*(1 - I*c*x))])/(4*d^2)

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2449

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> Dist[-e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2497

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[Pq^m*((1 - u)/D[u, x])]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rule 4942

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_)/(x_), x_Symbol] :> Simp[2*(a + b*ArcTan[c*x])^p*ArcTanh[1 - 2/(1 +
 I*c*x)], x] - Dist[2*b*c*p, Int[(a + b*ArcTan[c*x])^(p - 1)*(ArcTanh[1 - 2/(1 + I*c*x)]/(1 + c^2*x^2)), x], x
] /; FreeQ[{a, b, c}, x] && IGtQ[p, 1]

Rule 4964

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x])^p)*(
Log[2/(1 + e*(x/d))]/e), x] + Dist[b*c*(p/e), Int[(a + b*ArcTan[c*x])^(p - 1)*(Log[2/(1 + e*(x/d))]/(1 + c^2*x
^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 4966

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x]))*(Log[2/(1
 - I*c*x)]/e), x] + (Dist[b*(c/e), Int[Log[2/(1 - I*c*x)]/(1 + c^2*x^2), x], x] - Dist[b*(c/e), Int[Log[2*c*((
d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/(1 + c^2*x^2), x], x] + Simp[(a + b*ArcTan[c*x])*(Log[2*c*((d + e*x)/((c*
d + I*e)*(1 - I*c*x)))]/e), x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 + e^2, 0]

Rule 4968

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^2/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x])^2)*(Log[
2/(1 - I*c*x)]/e), x] + (Simp[(a + b*ArcTan[c*x])^2*(Log[2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] + S
imp[I*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1 - 2/(1 - I*c*x)]/e), x] - Simp[I*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1
 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] - Simp[b^2*(PolyLog[3, 1 - 2/(1 - I*c*x)]/(2*e)), x] + Si
mp[b^2*(PolyLog[3, 1 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/(2*e)), x]) /; FreeQ[{a, b, c, d, e}, x] &&
NeQ[c^2*d^2 + e^2, 0]

Rule 4974

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a
 + b*ArcTan[c*x])^p/(e*(q + 1))), x] - Dist[b*c*(p/(e*(q + 1))), Int[ExpandIntegrand[(a + b*ArcTan[c*x])^(p -
1), (d + e*x)^(q + 1)/(1 + c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] && N
eQ[q, -1]

Rule 5004

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 5040

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(-I)*((a + b*ArcT
an[c*x])^(p + 1)/(b*e*(p + 1))), x] - Dist[1/(c*d), Int[(a + b*ArcTan[c*x])^p/(I - c*x), x], x] /; FreeQ[{a, b
, c, d, e}, x] && EqQ[e, c^2*d] && IGtQ[p, 0]

Rule 5098

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2)^2, x_Symbol] :> Dist[1/(4*d^2*Rt[-e/
d, 2]), Int[(a + b*ArcTan[c*x])^p/(1 - Rt[-e/d, 2]*x)^2, x], x] - Dist[1/(4*d^2*Rt[-e/d, 2]), Int[(a + b*ArcTa
n[c*x])^p/(1 + Rt[-e/d, 2]*x)^2, x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0]

Rule 5100

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With
[{u = ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b,
 c, d, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || IntegerQ[m])

Rule 5104

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(m_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> I
nt[ExpandIntegrand[(a + b*ArcTan[c*x])^p/(d + e*x^2), (f + g*x)^m, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& IGtQ[p, 0] && EqQ[e, c^2*d] && IGtQ[m, 0]

Rule 5108

Int[(ArcTanh[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[1/2, Int[L
og[1 + u]*((a + b*ArcTan[c*x])^p/(d + e*x^2)), x], x] - Dist[1/2, Int[Log[1 - u]*((a + b*ArcTan[c*x])^p/(d + e
*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[u^2 - (1 - 2*(I/(I - c*x)))^
2, 0]

Rule 5114

Int[(Log[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(-I)*(a + b*Ar
cTan[c*x])^p*(PolyLog[2, 1 - u]/(2*c*d)), x] + Dist[b*p*(I/2), Int[(a + b*ArcTan[c*x])^(p - 1)*(PolyLog[2, 1 -
 u]/(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[(1 - u)^2 - (1 - 2
*(I/(I - c*x)))^2, 0]

Rule 6745

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {(a+b \arctan (c x))^2}{d^2 x}-\frac {e x (a+b \arctan (c x))^2}{d \left (d+e x^2\right )^2}-\frac {e x (a+b \arctan (c x))^2}{d^2 \left (d+e x^2\right )}\right ) \, dx \\ & = \frac {\int \frac {(a+b \arctan (c x))^2}{x} \, dx}{d^2}-\frac {e \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx}{d^2}-\frac {e \int \frac {x (a+b \arctan (c x))^2}{\left (d+e x^2\right )^2} \, dx}{d} \\ & = \frac {2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^2}-\frac {(4 b c) \int \frac {(a+b \arctan (c x)) \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}+\frac {\sqrt {e} \int \frac {(a+b \arctan (c x))^2}{\left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )^2} \, dx}{4 (-d)^{5/2}}-\frac {\sqrt {e} \int \frac {(a+b \arctan (c x))^2}{\left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )^2} \, dx}{4 (-d)^{5/2}}-\frac {e \int \left (-\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}+\sqrt {e} x\right )}\right ) \, dx}{d^2} \\ & = \frac {(a+b \arctan (c x))^2}{4 d^2 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^2}-\frac {(b c) \int \left (\frac {\sqrt {-d} e (a+b \arctan (c x))}{\left (c^2 d-e\right ) \left (-\sqrt {-d}+\sqrt {e} x\right )}+\frac {c^2 d \left (\sqrt {-d}+\sqrt {e} x\right ) (a+b \arctan (c x))}{\sqrt {-d} \left (c^2 d-e\right ) \left (1+c^2 x^2\right )}\right ) \, dx}{2 d^2}-\frac {(b c) \int \left (\frac {\sqrt {-d} e (a+b \arctan (c x))}{\left (-c^2 d+e\right ) \left (\sqrt {-d}+\sqrt {e} x\right )}+\frac {c^2 \left (d+\sqrt {-d} \sqrt {e} x\right ) (a+b \arctan (c x))}{\left (c^2 d-e\right ) \left (1+c^2 x^2\right )}\right ) \, dx}{2 d^2}+\frac {(2 b c) \int \frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}-\frac {(2 b c) \int \frac {(a+b \arctan (c x)) \log \left (2-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}+\frac {\sqrt {e} \int \frac {(a+b \arctan (c x))^2}{\sqrt {-d}-\sqrt {e} x} \, dx}{2 d^2}-\frac {\sqrt {e} \int \frac {(a+b \arctan (c x))^2}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 d^2} \\ & = \frac {(a+b \arctan (c x))^2}{4 d^2 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^2}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}+\frac {\left (i b^2 c\right ) \int \frac {\operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}-\frac {\left (i b^2 c\right ) \int \frac {\operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}+\frac {\left (b c^3\right ) \int \frac {\left (\sqrt {-d}+\sqrt {e} x\right ) (a+b \arctan (c x))}{1+c^2 x^2} \, dx}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {\left (b c^3\right ) \int \frac {\left (d+\sqrt {-d} \sqrt {e} x\right ) (a+b \arctan (c x))}{1+c^2 x^2} \, dx}{2 d^2 \left (c^2 d-e\right )}-\frac {(b c e) \int \frac {a+b \arctan (c x)}{-\sqrt {-d}+\sqrt {e} x} \, dx}{2 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {(b c e) \int \frac {a+b \arctan (c x)}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 (-d)^{3/2} \left (c^2 d-e\right )} \\ & = \frac {(a+b \arctan (c x))^2}{4 d^2 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^2}-\frac {b c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}+\frac {\left (b c^3\right ) \int \left (\frac {\sqrt {-d} (a+b \arctan (c x))}{1+c^2 x^2}+\frac {\sqrt {e} x (a+b \arctan (c x))}{1+c^2 x^2}\right ) \, dx}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {\left (b c^3\right ) \int \left (\frac {d (a+b \arctan (c x))}{1+c^2 x^2}+\frac {\sqrt {-d} \sqrt {e} x (a+b \arctan (c x))}{1+c^2 x^2}\right ) \, dx}{2 d^2 \left (c^2 d-e\right )}+\frac {\left (b^2 c^2 \sqrt {e}\right ) \int \frac {\log \left (\frac {2 c \left (-\sqrt {-d}+\sqrt {e} x\right )}{\left (-c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{1+c^2 x^2} \, dx}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {\left (b^2 c^2 \sqrt {e}\right ) \int \frac {\log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{1+c^2 x^2} \, dx}{2 (-d)^{3/2} \left (c^2 d-e\right )} \\ & = \frac {(a+b \arctan (c x))^2}{4 d^2 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^2}-\frac {b c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {i b^2 c \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {i b^2 c \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}-2 \frac {\left (b c^3\right ) \int \frac {a+b \arctan (c x)}{1+c^2 x^2} \, dx}{2 d \left (c^2 d-e\right )} \\ & = -\frac {c^2 (a+b \arctan (c x))^2}{2 d \left (c^2 d-e\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {(a+b \arctan (c x))^2}{4 d^2 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^2}-\frac {b c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b c \sqrt {e} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{3/2} \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{d^2}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{d^2}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {i b^2 c \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {i b^2 c \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{3/2} \left (c^2 d-e\right )}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{2 d^2}+\frac {b^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right )}{2 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2} \\ \end{align*}

Mathematica [F]

\[ \int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx=\int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx \]

[In]

Integrate[(a + b*ArcTan[c*x])^2/(x*(d + e*x^2)^2),x]

[Out]

Integrate[(a + b*ArcTan[c*x])^2/(x*(d + e*x^2)^2), x]

Maple [F]

\[\int \frac {\left (a +b \arctan \left (c x \right )\right )^{2}}{x \left (e \,x^{2}+d \right )^{2}}d x\]

[In]

int((a+b*arctan(c*x))^2/x/(e*x^2+d)^2,x)

[Out]

int((a+b*arctan(c*x))^2/x/(e*x^2+d)^2,x)

Fricas [F]

\[ \int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (e x^{2} + d\right )}^{2} x} \,d x } \]

[In]

integrate((a+b*arctan(c*x))^2/x/(e*x^2+d)^2,x, algorithm="fricas")

[Out]

integral((b^2*arctan(c*x)^2 + 2*a*b*arctan(c*x) + a^2)/(e^2*x^5 + 2*d*e*x^3 + d^2*x), x)

Sympy [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx=\text {Timed out} \]

[In]

integrate((a+b*atan(c*x))**2/x/(e*x**2+d)**2,x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (e x^{2} + d\right )}^{2} x} \,d x } \]

[In]

integrate((a+b*arctan(c*x))^2/x/(e*x^2+d)^2,x, algorithm="maxima")

[Out]

1/2*a^2*(1/(d*e*x^2 + d^2) - log(e*x^2 + d)/d^2 + 2*log(x)/d^2) + integrate((b^2*arctan(c*x)^2 + 2*a*b*arctan(
c*x))/(e^2*x^5 + 2*d*e*x^3 + d^2*x), x)

Giac [F]

\[ \int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (e x^{2} + d\right )}^{2} x} \,d x } \]

[In]

integrate((a+b*arctan(c*x))^2/x/(e*x^2+d)^2,x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x))^2}{x \left (d+e x^2\right )^2} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{x\,{\left (e\,x^2+d\right )}^2} \,d x \]

[In]

int((a + b*atan(c*x))^2/(x*(d + e*x^2)^2),x)

[Out]

int((a + b*atan(c*x))^2/(x*(d + e*x^2)^2), x)